# -*- coding: utf-8 -*-


from db.mysql import MysqlClient
from common.helper import Helper
from itertools import product
class Arrangement(object):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "平安儿童重大疾病保险"
def pullData(self, data={}):
    prices = ["68.50","166.50","264.50"]
    num = 0
    plan = {
        "year":["0-18岁"],
        "majorDisease":["10w","30w","50w"]
    }
    for v in product(plan["year"],plan["majorDisease"]):
        data["name"] = self.name
        data["company"] = "平安保险"
        data["year"] = v[0]
        data["majorDisease"] = v[1]
        data["expire"] = "1年"
        data["payType"] = "年交"
        data["price"] = prices[num]
        num+=1
        Helper.mergeTable( self.name,self.mysql,data )
